#include "summator.h"

Summator::Summator(QObject *parent) :
        QObject(parent), m_a(0), m_b(0)
{
}

void Summator::setA(int a)
{
    m_a = a;
    emit valueChanged();
}

void Summator::setB(int b)
{
    m_b = b;
    emit valueChanged();
}

int Summator::sum() const
{
    return m_a + m_b;
}
